<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
    <title>Transparency</title>
</head>
<body>
<p>Transparency, for PicoContainer, means that components do not have to implement any interface or abstraction in order
    to be components. Moreover, components do not have to adhere to any naming conventions or bundle any meta-data in
    order to qualify as components. </p>

<p>Constructor Injection is what we recommend, so the minimum definition of a component is a simple class that takes its
    dependencies in its constructor. For Setter Injection, it is a class with dependencies delivered via simple setters.
    Your components may be interface / implementation separated, but we are not forcing that for when using
    PicoContainer.</p>

<p>If you live with this ideal, you may be able to use the components you design for Pico with other frameworks or
    containers. I.e. you are not locked in. We suggest you choose other technologies that are similarly light on API and
    framework, and could be characterized as transparent. Good examples are XStream, Sitemesh and anything that deals
    with POJOs.</p>

<p>Given this goal, we have some exceptions:</p>

<h2>Lifecycle</h2>

<p>Java does not have a Startable interface, nor does it have a Disposable (.Net has IDisposable), so we made our own.
    You can use ours or your own in a similar design. If you use your own, you may want to extend
    StartableLifecycleStrategy and override a couple of methods. That's if you need lifecycle at all.</p>

<p>If a Startable inerface goes into J2SE, then it will probably be supported.</p>

<h2>Annotations</h2>

<p>We also support @Inject as an annotation for methods and fields. This is a variation of Setter Injection. The
    annotations are part of our codebase. Again, you can use your own, or others if you override one of the two classes
    from PicoContainer's codebase <strong>AnnotatedFieldInjection</strong> and <strong>AnnotatedMethodInjection</strong>.
</p>

<p>Annotations are a break with transparency, so we don't recommend them - stick to vanilla Constructor Injection if you
    can.</p>

<p>If a simple @Inject annotation goes into J2SE, then it will probably be supported.</p>
</body>
</html>
